package com.fpt.mockproject.j21.absd.util;

import java.text.Normalizer;
import java.text.Normalizer.Form;

/**
 * 
 * @author Linh HB Breaker
 *
 */
public class DiacriticalMarks {
	
	/**
	 * Use to remove all diacritical from string 
	 * Chuyen tieng viet co dau sang ki tu khong dau
	 * Duoc dung cho chuc nang search
	 * @param string
	 * @return
	 */
	public static String removeDiacriticalMarks(String string) {
	    return Normalizer.normalize(string, Form.NFD)
	        .replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
	}
}
